package cn.dlc.com.service;

public interface StockService {

	/**
	 * 通过数据库的锁来实现库存的控制
	 * @param id
	 * @param num
	 * @return
	 * @throws Exception
	 */
	boolean reduceStock(String id, Integer num) throws Exception;
	
	/**
	 * redis锁来实现库存的控制
	 * @param id
	 * @param num
	 * @return
	 * @throws Exception
	 */
	boolean reduceStockRedis(String id, Integer num) throws Exception;
}
